apply bug fixes/changes from Encyclopédie to mainline