Added a check in HandleSpellClick().