fixed stupid mistakes with setting the value of array objects