oops, forgot to open the port in binary mode as required.