fix bug in receipient hud, fix hud code generation