Fix a gainExp bug