fix shutdown_handler