toArray small fix