Fixing class removal while having similar classes