fixes order even if indexes are the same