fix line sorting and merging with Sof31t
minor