Fix signal hooks