fixed invalid UTF chars handling that could result in empty comments being created