fixed bugs related to testing metadata