Fix a bug about keys