Fix: test if class exists on adding existing data