Bug with class index fixed