Transmission problem

I have a 2002 BMW X5 4.6is V8, a message of trans failsafe appears on the dash. I have replaced the trans fluid and the gear location sensor but still get the message. It does not happen when I use M/S instead of Drive. The changes through all gears seem smooth even from park to reverse or drive. I have the warning message to check number plate light but I know 1 is broken. Can you please give any clues on where to look?