fixed peripheral connection bug