Fixed button flickering when a new pane is written over the old one.