BUGFIX: Fixed the results retrieval. There were two issues:
1. the case when the offset was larger than the number of results wasn't properly treated.
2. used copyToArray in a wrong manner