first code
fixed forced reactor shutdown