make ^C work and don't crash after a while