fixed func iternextto and prevto