Some fixes to get_data