Minor fixes

Previously JS error messages wouldn't take into account eh number of characters the line number took up, so the "---^" pointer could be off by a few characters. d0a6a21 fixes that.