added fix_keymetric_after_separation function to fix -./.- in key name
fix poisoned strcpy