Use correct limits

Limits passed to JS did not include checking max limit. That would've been
corrected in the API call anyway, but I'd rather have it just use the correct
limit.

Then the code would change negative limits for the default limit; we should
probably just have 0 then.

Change-Id: Ib559b74406f8f073f70b4cf6da852c8700f1ba74
Merge "Use correct limits"