Fixing an error obtaining the location for a Thread