Fixes Factor Tests and TabularCPD tests