Removed double toarray.