fixed bug with isArray for js