Reorders script ids upon deletion