Added the lockout logic