Tried to fix the null target exception (very strange since it should be possible) in the ThreadService.