Fixed error checking when listing remotes