lock fixes