Fixing order of operations

Just had to add parentheses to make sure variable assignments was
getting the correct value.