fixed bug to sync script