Fix encodings tests and handle missing field