stupid JS returns some crap instead of array