Ensure object keys are integer when passed to read