Prevented tooltips from overflowing the window