Community patch. Patches from previous forkers npotier, devits, davidwdan, phiamo.