fix shutdown python script