#90: fixed toArray/sort