fixed a bug when agent number has space