FT-273 Fixup a bug and a few tests