updates and bug fixes to collection and sobject element