CS311: Try to fix bug in signal handling.