fix to work with single files