Fixed encoding related issues.