Fixed so Ctrl+C actually exits script cleanly