Added explicit checks for zero.