The ".sort" on the line above was lost during this change, but it looks like it is needed for the comparison on line 106 below to work properly.