fixing connection problem