Fix cached data is not flushed when downloaded data is less than 16KiB