Fix getting branches from undefined

Try again