Fix AIO when thread creation failed