Applied changes caused by the security fix in spree 1.2.4.