Fix singleton object created on temporary thread