fixing a bug and df sorting