Fix some issues with last resort check on flush