rerender bug fix