Corrected bug in the LoaderThread