Might have fixed the threading problem