backport from Eon3D enhancements