Fix loading metadata