Fixed out of bounds error on number of characters