Fixed gathersampledata so it runs again