fix problem in calling ReinforcementAgent.final