fix a bug when assigning array of resources to some attribute