Fixed problems with leading zeros.  Now works for any length hex value, not just MongoDB's 24 character ObjectIds.