fix parsing issues. keyboard interupt is not completly working. still
runs some threads before responding to keyboard interrupt.