Couple of fixes for sync