Fixed a bug with a misnamed variable.