Added assignment of positions for the newly created photos