Fix metadata creation.
Code quality.