Issue with dividing by zero