fix rerender issue