fix bugs in hud and stack