Trying to deal with division by zero