fix cancel free bug