fix encoding errors