fix wront encoding check