remove unneccessary flushes