fixing crash when pending connection is closed.
Correcting typo.