shutdown bugfix