console: avoid division by zero