fixed iterator issue