Fixed an issue which caused syncing with multiple remotes to fail.