when you say "hooked up to battery #2" do you mean directly connected to battery #2 or the terminal at the Perko switch for Battery #2 :noidea:
Either way, the switch is out of the equation. The purpose of the switch is to select which battery will supply the main power to the boat/engine. The switch has a 'common positive terminal' and then the 'positive leads' of the 2 batteries connect to the switch at the #1 and #2 terminals. The switch position, then decides which batter(ies) are connected to the 'common positive terminal'.
Basically probably not the right set-up for what you wanted to do. . .