Fixed bugs in cancel attack