Fix flow erasing bug