diff --git a/demo/sphere1.R b/demo/sphere1.R
index 176f480ab3b03d1c1a55aa751b2065b349299a2e..a46eaf06c33f4f5eda3871ba828bd03c6e098d4d 100755
--- a/demo/sphere1.R
+++ b/demo/sphere1.R
@@ -15,7 +15,7 @@ gridded(grd1) <- TRUE
 grd2 <- grd1
 
 # add projection attributes to grd2
-proj4string(grd2) <- CRS("EPSG:4326")
+slot(grd2, "proj4string") <- CRS("EPSG:4326")
 
 # stratify both grids into 50 strata
 strat1 <- stratify(grd1, nStrata = 50)