Fix invalid cast exception in the spell creation dialog