major fixes to correct rerender