added code to disable tabs when no connection