Small fixes for sync