Backport some stuff from 1.0 into a new 0.8.2 rel