Backport of the fix for #108 from the 0.8 branch.
Released 0.7.6.