Fixed a key not found exception