Fix creating too many classes