changed the locks to work with new client struct
Merge branch 'new_locks'