Fix type of initial range

When we pass in ranges, the values seem to be strings rather than ints. It's only when getting the values from the database (upon refresh) that we pass in ints.

A longer term solution would be to make sure we always pass in range objects with the right type.

Fixes #1843 
You should pass in a radix of 10 too (same below), to prevent browsers from accidentally parsing something as an octal if it starts with a 0 (for whatever reason).