Not setting the value correctly when the agg value is zero