fixed bound-checking error which caused the bot to crash
Merge pull request #18 from elgis/fix-crash-error

fixed bound-checking error which caused the bot to crash