fixed card-connect error handling