Solves division-by-zero case.