xwma: Avoid division by zero