Fixed behavior for Edit forms.

Edit forms only have edit pages, so this code isn't relevant and
causes IndexError upon canceling.