fixed redirection bug on cancel click