Fixed code that checks for missing start tags.