fix "apps undeclared" error (missing let in local var declation)
Merge pull request #303 from rpl/fix-apps-undeclared-error

fix "apps undeclared" error (missing let in local var declation)