I'm definitely no expert here, but it sounds like it is either wired the wrong way around, or installed upside down or the like. i.e. it is active when it shouldn't be and not active when it should be, relative to the position of the gear leaver (or the switch is faulty as Phil said).
Check online for wiring diagrams, and also installation diagrams.