Fix Object Locking.

I mistakenly messed up the Object locking system.