fixed the iterable problem for collection, but not database