Core/Spells: fixed some crashes