fix type in metadata reader