Fix Lock before Unlock

Change-Id: I9be273f9987cdecf4252f10426a1f62d580ddfd9