Redirect to the previous page after editing