Added check for duplicates switch and disabled