Renamed spell::cast function to spell::_cast because cast function is one of system functions.