Fix error when rate == nil