fixed sync_up function to work with modules