- Improved lock check.