Avoid rate limiter slow down

Use to_f instead of to_i to avoid slowing down the rate limiter