Renamed a variable and fixed a typo.