Merge pull request #529 from Ledej/fix-sync

Fix the `script/sync` command
Merge remote-tracking branch 'upstream/master'