Bugfix for shutdown error.