So I recently changed out the pickups and preamp on my bass and installed an active/passive switch. At first try there was no hum anywhere. Then after a few minutes, there was some serious hum in passive mode. Everything else worked fine. I left, and came back home a few hours later and tried it again, and then no hum whatsoever. I checked all of my connections/solder points, everything was wired correctly, nothing was loose, and I then figured that I was the source of the hum. This is not the first time it has happened with me. How does this happen and how can I prevent it?