rewrite HUD dismiss code