fixed handling of syntax errors //thx, @maedox