fixed SIGINT handling and improved network thread shutdown handling to not EXPLODE HORRIBLY