fix offset out of bound error
Merge pull request #12 from teharrison/develop

fix offset out of bound error