Undo last patch and renamed flush to flush_block