Fixed ctrl+c bug - program was not stopping unless on the main thread is a sleep