fix bug that causes ArrayIndexOutOfBoundsException for small size of
array.
fix bug that LOUDSTrie can't extend vector when original size is small.