backport BEM-930 into 0.6.x
Merge pull request #456 from bem/backport/BEM-930

backport BEM-930 into 0.6.x