Bugfix to branch handler to allow for no branch specified