fix bug in __array__