Fixes some encoding problems