Some fixes to make it work with Spree 2.1