fixed some KeyType errors