Fix minor bugs in the simple_threads demo