fixed the bug of ArrayIndexOutOfBoundsException
Merge pull request #11 from kuozhang/temp

fixed the bug of ArrayIndexOutOfBoundsException