Potential fix for NoSuchElementException Issue #4