ensure when moving between tabs we don't crash and recover if possible

I think I simply changed the wrong line... ffs.