fix protential connection leaks.

connection would leak when using wrong run parameters or using noreply.