Fix for assigning ids to objects of trends model