handle the gain adjustment for ellipsegate. #85