Tightened up code.
Removed ambiguous debug statement.