Fix issue #42 use pk instead of id for identifying objects to keep