Bug fix for unexpected end-of-input.