Bug fix: check if the thread-storage has local data before accessing it