actually fix sorting