This was causing a NoSuchElementException.