fixed rerender bug