Sorted tmp and removed it