Set proper resource id after adding new resource