added waitforsubscribers snippet, which fixes the clean up objects bug