fixed a bug in array.js