out of bounds (indexing with -1) in case read failure fixes
Merge pull request #15 from Displacer/master

out of bounds (indexing with -1) in case read failure fixes