Fix agent.sh and some params