Some 7805 data sheets show capacitors on the input and output of the chip to reduce voltage oscillation that can occur.