Resolve wrong variable bug.