Corrected data type bug and limited max query size to 1M samples