Fix bug when updating single object in array.