Fix num_power when the power is equal to zero