fixed initialize connection bug