Fix cancel logic