Added unlock and moved locking in a seperate server.