Fix parse_dataset error handling