Holy shit all it was really was performing a computation without assigning the result (x *= n instead of x * n).