Upgraded to make it compatible with latest Spree versions