fix mixed up variable names