Fix cancel bug