Bugfix shutdown