Page re-renders after edit