Fixed Segment Problem, cleaned up out of bounds checking
Merge pull request #5 from abramsba/master

Fixed Segment Problem, cleaned up out of bounds checking