changed for zero case