fix flag return in eots.