fixed metadata generation