Removed copyToArray hack