Fixed bugs to make the parser working for LF.