workaround classgen bug