Fixes #1

Test wasn't checking for EOF
Fixes #2

len(nil) == 0
Fix failing test