add fixes and unittests to support ncm-metaconfig