fix cancel and view