#392 Make limit/offset usage safe for int conversions