Fixed schoolboy threading logic error