Fix ArrayIndexOutOfBoundsException.
cleanup