Adapt to changes made in regard to spree/spree issues #2851 and #3064