fixed metadata andling