Moved the condition for defuse key to function due to its length.