fix metadata loading.