fixed race condition in maximize_pane()