added stability in HUD and collision detection