fixed sync setting not working on the first time