Fix eof_ending CS issue