Ensuring key ids are integers