remove batch on cancel
code clean up