you have pretty much diagnosed your own problem. The problem is the main key. You need to take the car to a dealership or qualified car locksmith, and they can reset the key code or replace the faulty key. whatever one is the issue. Probably will cost around eighty dollars, but if you lose the other key, you wont regret spending this money!
Cheers Hutch