Fix signal handling.