fix bad fragment encoding