use the sm_* fields if they exist fixes #173
build