Fix collect for collect task in agent 2.4.0-dev