fixed state connection issue