Fixed bug when transferring binary files