Fixing compilation problems with class