fixed javascript error

'app' was not defined.