Properly compare arrays, slice extra commas.