Fix termination of community generator