fixed some weirdnesses with arrays of objects