Now properly handles collections of objects