removed unintended division by zero