Typos
Fix bug in branch opt code. Fixes #2