fixing double render on thread save