fixing bug with class functionality when there are no levels