--- src/Core/ResourceManager.m.orig	Sun Sep  6 18:52:33 2009
+++ src/Core/ResourceManager.m	Wed Mar 31 00:56:08 2010
@@ -153,7 +153,7 @@ static NSMutableDictionary *string_cache;
 	*/
 	return @"Resources";
 #else
-	return [[NSBundle mainBundle] resourcePath];
+	return [[NSBundle bundleWithPath: BUNDLE_PATH] resourcePath];
 #endif
 }
 
@@ -276,7 +276,7 @@ static NSMutableDictionary *string_cache;
 	if (requirementsMet)  [searchPaths addObject:path];
 	else
 	{
-		NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
+		NSString *version = [[[NSBundle bundleWithPath: BUNDLE_PATH] infoDictionary] objectForKey:@"CFBundleVersion"];
 		OOLog(@"oxp.versionMismatch", @"OXP %@ is incompatible with version %@ of Oolite.", path, version);
 		[self addErrorWithKey:@"oxp-is-incompatible" param1:[path lastPathComponent] param2:version];
 	}
@@ -296,7 +296,7 @@ static NSMutableDictionary *string_cache;
 	
 	if (ooVersionComponents == nil)
 	{
-		ooVersionComponents = ComponentsFromVersionString([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]);
+		ooVersionComponents = ComponentsFromVersionString([[[NSBundle bundleWithPath: BUNDLE_PATH] infoDictionary] objectForKey:@"CFBundleVersion"]);
 		[ooVersionComponents retain];
 	}
 	
