Fix bug in sync script.