fixed array-bug