fix keyboard interrupt issue in debug mode
fixes #4