Changed magento  to  to work properly with both methods