Made the display thread-safe