mode(edit,add,select) not always correct