More robust collection class handling.