Fixed divideby zero issue