fix bug in rate limiter