Changing UNO Rev3 chip from Atmega328-PU to Atmaga328P-PU

I think that's a bootloader bug. Try uploading the Optiboot bootloader.