Work on variable scope issue.