Efficiency: fix handling of overflow