Fix some errors in lib/array.js