fix a devision by zero issue