Fix signal handler