clean shutdown fix.