fix removal of QueuedConnection leading to wrong subscriber count

Addresses #526.