Backport of 0.2.7