Fixed appdata logic which was broken on OS X