Added support of < Mage 1.8 version