added flush before xfer