d7 1.x - fixing [#2330099] and [#2225741]