fixed bug when comparing given type key with the configured type key.