fix signal handler