Fix sloppy use of nearly identical variable names