Fixed validity check for controller.curAppID