diff --git a/libhts/libhts.py b/libhts/libhts.py
index 1cb75107986a2d008e4132c653f3000e9f6262cd..d17c61a161a026dfea98fcba537901e53347b825 100644
--- a/libhts/libhts.py
+++ b/libhts/libhts.py
@@ -289,6 +289,7 @@ def paste_bigwig_region(
             to_bw.values(chrom, 0, chrom_len),
             # pad zero on the left, and what is needed to complete the bin on the right
             (0, 10 * nb_bins - chrom_len),
+            mode="constant",
             constant_values=np.nan)
         if chrom == to_chrom:
             # Replace the values in the desired region