Adding مَا changes the sentence's subject into its object.

Negating Past-Tense Sentences with مَا