fixed some errors in gas.py