new object iteration logic including fix for crash reported in issue #31