fix keyboard interrupt exception