Bug fixes in sync_survey_units