fixed #7. Now reception can only happen after sender has added the connection and receiver is set up. Fixed cut and paste error with detach completion event. Fixed possibility of multiple close events.