fixed mixed-up variable names

#3314