fix dynamic connection bug