fixed the outofboudsexception
Merge pull request #2 from ThePotatoGuy/master

fixed the outofboudsexception