Revert "Revert "for bug #194, refine the config""

This reverts commit b4c1d553110159aa42f88d7ddf7bdf7983cb8cb3.
refine config, check the connections more precise