Updated to work with spree 2.0