Fixes problem destroying saved tabs. It's not pretty, but it gets the job done.