fix most flashing after rerender