fix possible encoding error