diff --git a/Makefile b/Makefile
index d9f8ca6f938025b485289b2e98cff5b00d252123..79a4b64d626eb4c8f9e9a54172fd8ec8ce51c975 100755
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 # setup
 # modified by zerom for WinARM 8/2010
 
-STM32_HAL_PATH=$(HOME)/humanoids/stm32_hal
-STM32_LIBRARIES_PATH=$(HOME)/humanoids/stm32_libraries
+STM32_HAL_PATH=$(HOME)/humanoides/tools/stm32_hal
+STM32_LIBRARIES_PATH=$(HOME)/humanoides/tools/stm32_libraries
 
 PROJECT_NAME=darwin_firmware
 #TARGET_FILES=$(wildcard src/*.c)
diff --git a/src/eeprom.c b/src/eeprom.c
index ca45c913d0c898359c8f5dca5611b6f01aacf936..3edde16ec1ce12454a9edc248eaebd05213821c8 100755
--- a/src/eeprom.c
+++ b/src/eeprom.c
@@ -331,22 +331,43 @@ uint16_t EE_VerifyPageFullyErased(uint32_t Address)
   uint16_t addressvalue = 0x5555;
     
   /* Check each active page address starting from end */
-  while (Address <= PAGE0_END_ADDRESS)
+  if(Address==PAGE0_BASE_ADDRESS)
   {
-    /* Get the current location content to be compared with virtual address */
-    addressvalue = (*(__IO uint16_t*)Address);
+    while (Address <= PAGE0_END_ADDRESS)
+    {
+      /* Get the current location content to be compared with virtual address */
+      addressvalue = (*(__IO uint16_t*)Address);
 
-    /* Compare the read address with the virtual address */
-    if (addressvalue != ERASED)
+      /* Compare the read address with the virtual address */
+      if (addressvalue != ERASED)
+      {
+        /* In case variable value is read, reset readstatus flag */
+        readstatus = 0;
+
+        break;
+      }
+      /* Next address location */
+      Address = Address + 4;
+    }
+  }
+  else
+  {
+    while (Address <= PAGE1_END_ADDRESS)
     {
-      
-      /* In case variable value is read, reset readstatus flag */
-      readstatus = 0;
+      /* Get the current location content to be compared with virtual address */
+      addressvalue = (*(__IO uint16_t*)Address);
 
-      break;
+      /* Compare the read address with the virtual address */
+      if (addressvalue != ERASED)
+      {
+        /* In case variable value is read, reset readstatus flag */
+        readstatus = 0;
+
+        break;
+      }
+      /* Next address location */
+      Address = Address + 4;
     }
-    /* Next address location */
-    Address = Address + 4;
   }
   
   /* Return readstatus value: (0: Page not erased, 1: Page erased) */