fix bug about js array