fixed issue with setting object array element