fix rerender problem