Fixed a bug with getting metadata