Fix incorrect variable scope issue.