Fixed "cannot read _panes on undefined" error.