I realised that the power regulator might need protection from the 3v3 line on the programming header. Added a diode just in case.