Alright guys - pretty new to the site and to BMWs

Fixed a few issues i had with the car through helpful topics on this site and many others, however this is one that i cant get my head round.

I own a 523i e39 and when i got the car i noticed the sidelights were unplugged, so i plugged them in and went about my business..
The next day i noticed that even with the keys out the ignition and the car locked my passenger side sidelight was on.

Any ideas as to how id go about sorting it?

Thanks, Kieran.