task engine, fixed new connection error when using an asset with a shared credential that uses a private key, fixes #356