Added tracking of bad boxes