If your using the lives and earths that were already behind the stereo, disconnect them and tape them up. Take a direct fused feed from the battery and an earth to the stereo with the wires just on the outside of the car and rev your engine to see if it still does it. If that sorts it you know that its the wiring inside your motor thats not perfect.
Paul