Fixed a bug in the file metadata lookup