add EOF return

also typo