Fix call to flush by passing a timestamp