fix positive_total logic