fix 500 on bad utf-8