Fix receiving empty files.