Changed way char is converted to string for JS