You might've created a framing problem. Can you post the entire code? What is the definition of "M1"?