Lock handler.