Fix cancel

Fixes cancel bug.