ensure that keys are ints