fix parsing of nested conditionals