fixed bugs in api collection (add from collection)