More fixes to gain plots