fix branching and ticket selection