Added handling of interrupt signal.