Fixes small bugs that were found by html4j TCK