MTP and PTP fixes by Braccoz