Thank you for all of your replies. In fact my spare key's battery was dead, therefore I cut the old shell out and replaced the battery on the chip. I bought a new blank key with shell and got it cut. So, it is the matter of putting them together and program.
Since you said it could be the memory, and that happens to be my main key, what can i do?