Fix NoSuchElementException
Merge pull request #2 from kfer38/master

NoSuchElementException when adding item to empty list.