Fixed dividebyzero issue