Fixed issues with character encoding