Replace is_locked with find