Similar fix, I noticed that there seemed to be panes that were not closing properly, leaving 'empty panes' so I fixed the unloading method. This time, following official docs recommendation not to detach leaves in onunload. Also ensuring that the refresh will close extra leaves.