Fix JS scoping issue.