Fix compilation bug with inheritance