from Björn Ketelaars (I added a comment to recheck autogen because it changed again since that patch)