[WIP] Fixed #277 - Prevent sync concurrency

Can we factor this outside coz its repeated exactly as is in two places