changed isDuplicate to isDuplicateTab