Fix possible bug when uploading files and then getting patches back.