bug fixed: signal handler