fix sorting without diff