fix for insert cancel bug, more comments.