Fixed crash when deleting a blank tab