bugfix in particle swarm