fix device connect callback issue