Fixes some charset-related errors