try changing order of locks