try fixing signal handling