check if lastUsedTab exists before switching to it (last commit)