Fixed use of variables in math