properly removing orphaned marks