Fixes some bugs in basic swarming.