key_commit: collections: fix some issues with attaching and removing