Horizontal stability of a bouncing ball