diff --git a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
index 64e65194410d5bcb21ad4911de0f5eb0547b5ad5..f467d16bce84cb66c4170688dc969c6be73db526 100644
--- a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
+++ b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
@@ -114,9 +114,9 @@ int main(void)
 					
 					if (NoteOnEvent || NoteOffEvent)
 					{
-						printf_P(PSTR("MIDI Note %s - Channel %d, Pitch %d, Velocity %d"), NoteOnEvent ? "On" : "Off",
-																						   ((MIDIEvent.Data1 & 0x0F) + 1),
-																						   MIDIEvent.Data2, MIDIEvent.Data3);
+						printf_P(PSTR("MIDI Note %s - Channel %d, Pitch %d, Velocity %d\r\n"), NoteOnEvent ? "On" : "Off",
+																						       ((MIDIEvent.Data1 & 0x0F) + 1),
+																						       MIDIEvent.Data2, MIDIEvent.Data3);
 					}
 				}
 		
diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
index 1ca7bd98305c6f698136d31857eb3708089837a4..6964f71eaea494efcd190eb3bda7ab3d62e82d5d 100644
--- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
+++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
@@ -186,9 +186,9 @@ void MIDI_Host_Task(void)
 				
 				if (NoteOnEvent || NoteOffEvent)
 				{
-					printf_P(PSTR("MIDI Note %s - Channel %d, Pitch %d, Velocity %d"), NoteOnEvent ? "On" : "Off",
-				                                                                       ((MIDIEvent.Data1 & 0x0F) + 1),
-				                                                                       MIDIEvent.Data2, MIDIEvent.Data3);
+					printf_P(PSTR("MIDI Note %s - Channel %d, Pitch %d, Velocity %d\r\n"), NoteOnEvent ? "On" : "Off",
+				                                                                           ((MIDIEvent.Data1 & 0x0F) + 1),
+				                                                                           MIDIEvent.Data2, MIDIEvent.Data3);
 				}
 
 				Pipe_ClearIN();
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt
index 1eac9ebcccbc305391dbc3695a8775d83b2b8a0b..e7f1f43837aa8ea055eb02377e34ce3c51f15e57 100644
--- a/LUFA/ManPages/ChangeLog.txt
+++ b/LUFA/ManPages/ChangeLog.txt
@@ -26,6 +26,8 @@
   *  - Fixed ADC routines not correctly returning the last result when multiple channels were read
   *  - Fixed ADC routines failing to read the extended channels (Channels 8 to 13, Internal Temperature Sensor) on the
   *    U4 series USB AVR parts
+  *  - Fixed PDI programming mode in the AVRISP programmer project not exiting programming mode correctly (clear target
+  *    Reset key twice, set /RESET pin to pullup)
   *
   *  \section Sec_ChangeLog100219 Version 100219
   *
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
index 805eaa31fedf8e340714a4493d898fec6349fb47..08936a202dfaf399dae9341e52cefc6dff9eb067 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
@@ -119,7 +119,7 @@ static void XPROGProtocol_EnterXPROGMode(void)
 	{
 		/* Enable PDI programming mode with the attached target */
 		XPROGTarget_EnableTargetPDI();
-		
+
 		/* Store the RESET key into the RESET PDI register to keep the XMEGA in reset */
 		XPROGTarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);	
 		XPROGTarget_SendByte(PDI_RESET_KEY);
@@ -170,14 +170,22 @@ static void XPROGProtocol_LeaveXPROGMode(void)
 	
 	if (XPROG_SelectedProtocol == XPRG_PROTOCOL_PDI)
 	{
+		XMEGANVM_WaitWhileNVMBusBusy();
+
 		/* Clear the RESET key in the RESET PDI register to allow the XMEGA to run */
 		XPROGTarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);	
 		XPROGTarget_SendByte(0x00);
+		
+		/* Clear /RESET key twice (for some reason this needs to be done twice to take effect) */
+		XPROGTarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);	
+		XPROGTarget_SendByte(0x00);
 
 		XPROGTarget_DisableTargetPDI();
 	}
 	else
 	{
+		TINYNVM_WaitWhileNVMBusBusy();
+
 		/* Clear the NVMEN bit in the TPI CONTROL register to disable TPI mode */
 		XPROGTarget_SendByte(TPI_CMD_SSTCS | TPI_CTRL_REG);	
 		XPROGTarget_SendByte(0x00);
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
index 957084c0b10281b27c8466668f936c7e6e41c752..4ecf033356079f3fb3bed588c5f48dc7fb39e7cf 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
@@ -232,33 +232,24 @@ void XPROGTarget_DisableTargetPDI(void)
 	XPROGTarget_SetRxMode();
 
 #if defined(XPROG_VIA_HARDWARE_USART)
-	/* Set /RESET high for a one millisecond to ensure target device is restarted */
-	PORTD |= (1 << 5);
-	_delay_ms(1);
-
 	/* Turn off receiver and transmitter of the USART, clear settings */
-	UCSR1A |= (1 << TXC1) | (1 << RXC1);
+	UCSR1A  = ((1 << TXC1) | (1 << RXC1));
 	UCSR1B  = 0;
 	UCSR1C  = 0;
 
-	/* Set all USART lines as input, tristate */
+	/* Make Reset input with pullup to take target out of /RESET, tristate all other pins */
 	DDRD  &= ~((1 << 5) | (1 << 3));
-	PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));
+	PORTD &= ~((1 << 3) | (1 << 2));
+	PORTD |=   (1 << 5);
 #else
 	/* Turn off software USART management timer */
 	TCCR1B = 0;
 
-	/* Set /RESET high for a one millisecond to ensure target device is restarted */
-	BITBANG_PDICLOCK_PORT |= BITBANG_PDICLOCK_MASK;
-	_delay_ms(1);
-
-	/* Set DATA and CLOCK lines to inputs */
+	/* Make Reset input with pullup to take target out of /RESET, tristate all other pins */
 	BITBANG_PDIDATA_DDR   &= ~BITBANG_PDIDATA_MASK;
 	BITBANG_PDICLOCK_DDR  &= ~BITBANG_PDICLOCK_MASK;
-	
-	/* Tristate DATA and CLOCK lines */
-	BITBANG_PDIDATA_PORT  &= ~BITBANG_PDIDATA_MASK;
 	BITBANG_PDICLOCK_PORT &= ~BITBANG_PDICLOCK_MASK;	
+	BITBANG_PDIDATA_PORT  |=  BITBANG_PDIDATA_MASK;
 #endif
 }