wrong iter value was used when determining type