fix SIGALRM handling