fix bug with unicode headkey