fix division by zero