Fix bug with setting flush when not dirty