Added signal handling.