Changed the signal handling.