Fix encryption bug in new transfer protocol.