fix for virtual classes