Fix error being thrown when moving tabs to different panes
Improve GC