be defensive and don't allow division by zero