fixing metadata parsing