What is preventing my Macbook Pro 2012 from going to sleep? the other day i open my MacBook Pro mid 2012 for upgrading my ram, everything was ok, but when i closed it i notice that when i close the lid nothing happens. The apple on the lid remain on and the mac continue to work even if there are no apps opened.

It is possibile that i've touched some sensor when i opened it?

If i click the power button it goes in sleep mode normally.

EDIT: It's doesn't work even in SAFE MODE
Just found what was wrong. It was the connector to the mother base which wasn't well connected.