Incremental modification for handling program termination