fix sorting of gas