fixed runtime errors in renumber