fixed nested conditions in parser