Try fixing unit test by moving flush