fixed bugs in edit page