Game working randomly with more than one operation