fix of #2851

fixes  https://github.com/spree/spree/issues/2851