diff --git a/Dockerfile b/Dockerfile
index 7e337956847cb845b75238520aeb6ce3ff7f85c4..3f721384b79c18cb5e4db2df5275c217d432abbd 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -149,7 +149,7 @@ RUN if [ -f "/kaniko/run/secrets/http_proxy" ]; then export http_proxy=$(cat /ka
         gdal-bin \
         && \
     rm -rf /var/lib/apt/lists/* && \
-    rm /usr/local/share/ca-certificates/*
+    rm -rf /usr/local/share/ca-certificates/*
 
 # install OTB from builder
 COPY --from=builder /install/otb /usr/local
@@ -171,7 +171,7 @@ ARG GIT_TOKEN
 RUN if [ -f "/kaniko/run/secrets/http_proxy" ]; then export http_proxy=$(cat /kaniko/run/secrets/http_proxy); export https_proxy=$(cat /kaniko/run/secrets/https_proxy); fi && \
     mkdir -p /install && \
     cd /install && \
-    git clone --branch 0.6.1 https://github.com/CNES/rastertools.git && \
+    git clone --branch 0.6.2 https://github.com/CNES/rastertools.git && \
     export PYTHONWARNINGS="ignore:Unverified HTTPS request" && \
     pip3 install \
     --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org \
diff --git a/python/s2snow/snow_detector.py b/python/s2snow/snow_detector.py
index 828547b550d9bcadc310d8fd782d0db16b58198a..e14680e07f01c7e7e979e3c2fc09f87a4b055f26 100755
--- a/python/s2snow/snow_detector.py
+++ b/python/s2snow/snow_detector.py
@@ -169,7 +169,7 @@ def detect_snow(config, output_dir, chain_version=None, product_counter=None):
                 raise
         if config.shaded_snow_hillshade and config.shaded_snow_casted:
             logging.info("Combine both classic hillshade method and rastertools methods.")
-            compute_combined_hillshade_mask(relief_shadow_mask, tmp_dir, hillshade_mask)
+            compute_combined_hillshade_mask(HILLSHADE_MASK, tmp_dir, hillshade_mask)
     else:
         relief_shadow_mask = config.relief_shadow_mask