fix iterator erase undefine issue