A few bugs fixed in debug.html.