convert nils to zero