corrected bug related to array len change