Small fixes to menuFunctions, fixing some parentheses and branching