Problem with result array is corrected