repair encoding (sheeettt!!!!)