Fix AttributeError: Values instance has no attribute 'test_flag'