double encode bug