Fix for when there is no active tab