Fixed a missing variable bug.