Check the brake light switch. Ensure it works when the pedal is pressed, and is not working when the pedal is released.
Then check the earth at the left rear lamp. (Might be the right for LHD vehicle.) The gearbox control unit seems to rely on an earth at the rear lamp. Has caused Panda and Punto owners grief.