Fix cleanup_id to work, in a limited way, with unicode