Fixed so things shutdown properly on Ctrl+C