Improved the htmlTable viewer handling (thanks Adam Smith)