Added minor debuging support for malformed HTML