Fix name value pair encoding