Fix a bug with appPath