fixed connection bug