Latest stc work: a few bug fixes.