[gas mode] Fix undefined var error