small fix for mage