fix for virtuals in global scope