Fixed bugs from adding classes