Convert version and segment number to correct format before querying MongoDB.