Fixed bug on cancel.