Avoid division by zero in frequencies calculation