Fix array overrun
Merge pull request #9 from bskari/master

Fix array overrun