diff --git a/src/com/silverwrist/venice/htmlcheck/impl/HTMLCheckerImpl.java b/src/com/silverwrist/venice/htmlcheck/impl/HTMLCheckerImpl.java
index 1dd4a33..16565f6 100644
--- a/src/com/silverwrist/venice/htmlcheck/impl/HTMLCheckerImpl.java
+++ b/src/com/silverwrist/venice/htmlcheck/impl/HTMLCheckerImpl.java
@@ -834,6 +834,7 @@ class HTMLCheckerImpl implements HTMLChecker, HTMLCheckerBackend, RewriterServic
if (config.getProcessParens())
{ // we're going into Parens mode...
doFlushString();
+ paren_level = 0;
state = ST_PAREN;
} // end if
@@ -1011,9 +1012,11 @@ class HTMLCheckerImpl implements HTMLChecker, HTMLCheckerBackend, RewriterServic
// This is the "end parse" loop, in which we resolve any funny state the parser has
// found itself in and clear out the internal buffers.
- boolean running = false;
+ boolean running;
do
{ // what we do depends on the parser state...
+ running = false; // make sure we stop unless running is set to true here
+
switch (state)
{
case ST_WHITESPACE: