fix key/entity mismatch