Fixed a bug with not passing the parameters correctly to the particle
swarm