fixes on signal handler