fix for pcr, typo in gains function