Improved rate limiter