Remove duplicate in switch