added edit action and fixed update page error