fix bug in metadata