fix: locking and lock checking