Fix Divide by Zero issue