fix the typo.
fix the bug that did not properly traverse array.