fixed encdoing issue