remove bug in key.c