Fixed metadata pointer bug