Fix bug with writing strings in the browser