fix cancel bug