fix for right sort