Fixed issue with THEN..AND being treated as a GIVEN
HTML output formatting