Fix stash sorting bug.