Use proper syntax for getting next element of iterator