Fixed broken variable names after refactor