addressed two bugs

one is  a unicode bug that requires further inspection
the other is a simple typing bug in the javascript