Fix agent parameters passing in constructor.