Fixed class function inheritance with virtuals