added bc.clear() calls in modifying members of NFA