diff --git a/drivers/hidparser.c b/drivers/hidparser.c
index 1fb4a5e..a1033c3 100644
--- a/drivers/hidparser.c
+++ b/drivers/hidparser.c
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 
 #include "config.h"
+#include "common.h"
 #include "hidparser.h"
 #include "nut_stdint.h"		/* for int8_t, int16_t, int32_t */
 
@@ -474,6 +475,14 @@ void GetValue(const unsigned char *Buf, HIDData_t *pData, long *pValue)
 		*pValue = value;
 		return;
 	}
+
+	if(range == 2 && pData->Size != 1) {
+		pData->LogMax = (1 << pData->Size) -1;
+		upsdebugx(3, "%s: Size = %d; adjusting Logical Maximum to 0x%lx\n", __func__, pData->Size, pData->LogMax);
+		*pValue = value;
+		return;
+	}
+
 	b = hibit(range-1);
 
 	/* throw away insignificant bits; the result is >= 0 */
