fixing vectoriterator issue