fixed array out-of-bounds
Merge pull request #40 from vhalbert/addsettings

fixed array out-of-bounds