Fix signal handler check