fixed an issue where a branch got selected even if none was specified.