Fixes handling of EOF in the compiler

Fixes #127
Fixes #93