Fix getting generated keys in DiscussionManager