bug fix on connected