fixing substr warning on fldtype, take 2.