fix issues with sync