Fix tests.
Fix NPE (why?).
Fix html escaping in instance of name.