make sure TextProduct.z is defined, add test case