Object array writing seems broken