Fixed bug when editing a record with missing files