fixed empty mark and delete bug