Fixed certain cases when originalFilename was wrong