Fixed a major bug causing invalid ids to be returned for String types.