Fix the sorting issue with operations

fixes #90