Fixed a bug in loading the keys.