Fix signal handler attach