fixed an issue with encoding