fix class duplication check