Fix error from using the wrong variable.