Fix a bug where pending cleanup clients wouldn't be added on exit calls.