fixed a bug which prevented file metadata from being saved