Bugfix : fixed unreached code to work correctly in get_dataset func