added connection error and search fix