       } = meterData
       
       {x, y} = meterData.position if meterData.position?
-      
+
       return unless show
-          
-      ratio = I[name] / I["max#{name.capitalize()}"]
-                  
+
+      ratio = (I[name] / I["#{name}Max"]).clamp(0, 1)
+
       canvas.drawRoundRect
         color: backgroundColor
         radius: borderRadius
         x: x
         y: y
         width: width
-        height: height       
+        height: height
       
       canvas.drawRoundRect
         color: color

        y: y
        radius: borderRadius
        width: width * ratio
        height: height      
        
      canvas.drawRoundRect
        x: x

        
    I[name] ?= 100
    
    if not I["#{name}Max"]
      if I[name]
        I["#{name}Max"] = I[name]
      else
        I["#{name}Max"] = 100
    
    I.meters[name] = options
    
