Fix inconsistent variable naming. Now it works.