On the back of your head unit (stereo) you have two power leads. One is for main power that is supposed to go to the ignition. The other goes to the battery and is auxiliary power. Sounds to me like both of your power leads are going to the ignition, or they are reversed from their intended...