HID: fix a couple of off-by-ones