Solved problem with repeated classes