Fixed error with rate generation