Fix deploy (and likely other commands) not switching back to the original branch after completion