I have the same intermitten problem with my key for my 2003 X5 my solution was the contact for the battery in the key was broken you have gentlely cut the key apart and used soldering to fix the contact link.