Merge pull request #10 from SlrG/master

Index out of range fix by gboudreau.