fixed timing issue in sync