fix binary file transfer bug.