diff --git a/Source/portable/MPLAB/PIC32MX/ISR_Support.h b/Source/portable/MPLAB/PIC32MX/ISR_Support.h
index 9a9caa3afe..56b44e22fe 100644
--- a/Source/portable/MPLAB/PIC32MX/ISR_Support.h
+++ b/Source/portable/MPLAB/PIC32MX/ISR_Support.h
@@ -208,8 +208,8 @@
 	addiu		sp,	sp,	portCONTEXT_SIZE
 
 	mtc0		k0, _CP0_STATUS
-	ehb
 	mtc0 		k1, _CP0_EPC
+	ehb
 	eret 
 	nop
 
diff --git a/Source/portable/MPLAB/PIC32MX/port_asm.S b/Source/portable/MPLAB/PIC32MX/port_asm.S
index 7c6d4ae883..ad1a7b23a6 100644
--- a/Source/portable/MPLAB/PIC32MX/port_asm.S
+++ b/Source/portable/MPLAB/PIC32MX/port_asm.S
@@ -284,9 +284,9 @@ vPortYieldISR:
 	/* Remove stack frame. */
 	addiu		sp,	sp,	portCONTEXT_SIZE
 
-	mtc0		k1, _CP0_STATUS
-	ehb	
+	mtc0		k1, _CP0_STATUS	
 	mtc0 		k0, _CP0_EPC
+	ehb
 	eret 
 	nop