fixed stale lock detection