fixed weird cancel bug