Moved drawing of pins to main thread.