fix error when uploading small files