fixing encode issues.