fix cancel logic when when commands were used