updated locks to work with akka messages.