Fix bug in handling of max hosts
Disable termination for the first run