fixing the issue(divide by 0)