diff --git a/src/libprefs.cpp b/src/libprefs.cpp
index da58013..90d0aa4 100644
--- a/src/libprefs.cpp
+++ b/src/libprefs.cpp
@@ -71,6 +71,7 @@
 #include <image.h>
 #endif
 
+#include <Entry.h>
 
 /*	identifier for this implementation of the prefs library	*/
 #define	PREF_VERSION_STRING		"simple libprefs.so version 1.2.4"
@@ -435,7 +436,7 @@ _PREFMakePath(
 {
 	status_t err = B_OK;
 	BPath bpath;
-	err = find_directory(user_level ? B_USER_SETTINGS_DIRECTORY : B_COMMON_SETTINGS_DIRECTORY, &bpath, true, NULL);
+	err = find_directory(B_USER_SETTINGS_DIRECTORY, &bpath, true, NULL);
 	if (err < B_OK) return err;
 	strncpy(path, bpath.Path(), path_max);
 	path[path_max-1] = 0;
@@ -894,9 +895,9 @@ PREFReloadSet(PREFData data)
 #if DEBUG
 	printf("reload read %d\n", rd);
 #endif
+	char * buffer = (char *)malloc(size);
 	if (rd < 0) { err = rd; goto cleanup; }
 	if (rd != sizeof(size)) { err = B_ERROR; goto cleanup; }
-	char * buffer = (char *)malloc(size);
 	if (buffer == NULL) { err = B_NO_MEMORY; goto cleanup; }
 	rd = read(data->transaction->fd, buffer, size);
 #if DEBUG
@@ -1156,7 +1157,7 @@ typedef struct _PREFAppIterator {
 			curItem = 0;
 			item = new char*[block];
 			BPath bpath;
-			if (!find_directory(user_level ? B_USER_SETTINGS_DIRECTORY : B_COMMON_SETTINGS_DIRECTORY, &bpath, true, NULL))
+			if (!find_directory(B_USER_SETTINGS_DIRECTORY, &bpath, true, NULL))
 			{
 				BDirectory dir(bpath.Path());
 				BEntry entry;
@@ -1278,7 +1279,7 @@ typedef struct _PREFSetIterator
 			curItem = 0;
 			item = new char*[block];
 			BPath bpath;
-			if (!find_directory(user_level ? B_USER_SETTINGS_DIRECTORY : B_COMMON_SETTINGS_DIRECTORY, &bpath, true, NULL))
+			if (!find_directory(B_USER_SETTINGS_DIRECTORY, &bpath, true, NULL))
 			{
 				char str[B_FILE_NAME_LENGTH+20];
 				strcpy(str, LP_MAGIC);
