Fix the limit/offsets when querying metadata