fixed and detected bugs related to the sorting of positions in jellies