Resolves bugs: out of bounds 

Resolves bugs: out of bounds if random length is bigger than the number of allowed chars
Merge pull request #22 from manuelolmos/patch-1

Resolves bugs: out of bounds