Duplicate key fix