diff --git a/climax/core/dataset.py b/climax/core/dataset.py
index 2d609a58c6b04b41d32696788ade348ed331b73e..9597afdbccd1dc1906f9b626fd5a382d7b375dcc 100644
--- a/climax/core/dataset.py
+++ b/climax/core/dataset.py
@@ -108,7 +108,7 @@ class ERA5Dataset(EoDataset):
 
         # drop projection variable, if present
         predictors = [ds.drop_vars(PROJECTION) for ds in predictors if
-                      PROJECTION in predictors]
+                      PROJECTION in ds.data_vars]
 
         # merge final predictor dataset
         return xr.merge(predictors)