FIX wrong connection termination on start

Test case will follow in a next pull request.