bugfix in dumping string to js