Resolution for the undefined connection error