repair the lock. Also suspicious dead code