Did the toArray() not work here?