diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
index 3627486ca2194cc86ed85681279bb74cdce213b7..342642d22624545a13de694a503267aeec861cb5 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
@@ -263,6 +263,10 @@ static inline int abs32(int x) {
   return (((int)((short*)&x)[0])*((int)((short*)&x)[0]) + ((int)((short*)&x)[1])*((int)((short*)&x)[1]));
 }
 
+#ifdef DEBUG_PHY
+  int debug_cnt=0;
+#endif
+
 int lte_sync_time(int **rxdata, ///rx data in time domain
 		  LTE_DL_FRAME_PARMS *frame_parms,
 		  int *eNB_id) {
@@ -295,6 +299,7 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
   peak_pos = 0;
   sync_source = 0;
 
+
   for (n=0; n<length; n+=4) {
 
 #ifdef RTAI_ENABLED
@@ -396,9 +401,16 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
 
   
 #ifdef USER_MODE
-  write_output("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
-  write_output("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
-  write_output("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2);
+  if (debug_cnt == 5) {
+    write_output("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
+    write_output("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
+    write_output("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2);
+    write_output("rxdata0.m","rxd0",rxdata[0],length<<1,1,1);
+    exit(-1);
+  }
+  else {
+    debug_cnt++;
+  }
 #endif
 #endif
 
diff --git a/openair1/PHY/LTE_TRANSPORT/initial_sync.c b/openair1/PHY/LTE_TRANSPORT/initial_sync.c
index 4419e549e43946cbebfc3e4fc1df1e1f26823999..4541b91eb5a8bef4fb07dadf8781f135a887c195 100644
--- a/openair1/PHY/LTE_TRANSPORT/initial_sync.c
+++ b/openair1/PHY/LTE_TRANSPORT/initial_sync.c
@@ -468,8 +468,11 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode) {
     generate_pcfich_reg_mapping(frame_parms);
     generate_phich_reg_mapping(frame_parms);
     //    init_prach625(frame_parms);
-   
+#ifndef OPENAIR2
+    phy_vars_ue->UE_mode[0] = PUSCH;
+#else   
     phy_vars_ue->UE_mode[0] = PRACH;
+#endif
     //phy_vars_ue->lte_ue_pbch_vars[0]->pdu_errors=0;
     phy_vars_ue->lte_ue_pbch_vars[0]->pdu_errors_conseq=0;
     //phy_vars_ue->lte_ue_pbch_vars[0]->pdu_errors_last=0;