fix a case when you set only the file field for the first time