Fix bug if there is no remote branch defined