Fix bug in rate limit