Fix precedence error and simplify code