Fixed not overwriting the config from the metadata.json

Added unit test for that