Updated to prevent possible lockout