this check is not correct, as undefined is not a valid appName