"app is not defined" error fix