Fix reset state on cancel