Class Mage detection changes