Get rid of power_off_when_done global variable.