memReq->dest = dest_addr;
             memReq->size = 64;
             memReq->time = curTick;
+            memReq->flags &= ~INST_READ;
             dcacheInterface->access(memReq);
         }
     }
         memReq->cmd = Read;
         memReq->completionEvent = NULL;
         memReq->time = curTick;
+        memReq->flags &= ~INST_READ;
         MemAccessResult result = dcacheInterface->access(memReq);
 
         // Ugly hack to get an event scheduled *only* if the access is
         memcpy(memReq->data,(uint8_t *)&data,memReq->size);
         memReq->completionEvent = NULL;
         memReq->time = curTick;
+        memReq->flags &= ~INST_READ;
         MemAccessResult result = dcacheInterface->access(memReq);
 
         // Ugly hack to get an event scheduled *only* if the access is
             memReq->completionEvent = NULL;
 
             memReq->time = curTick;
+            memReq->flags |= INST_READ;
             MemAccessResult result = icacheInterface->access(memReq);
 
             // Ugly hack to get an event scheduled *only* if the access is