Fixed sorting of elements in the clipboard (#1)