Fixed an issue with pushing to remotes with a ref spec.