Fix signal trapping