Fix bug in edit page