Core/Spells: some crash fixes