Fix a possible duplication bug