Rerender bug fix