bug fix in sendfile