Now supports the global locking to prevent false results