Fixed file download and render bug