Fixing a minor issue: toArray method does not accept 4th parameter