encode fix test