fixed misplaced lock