diff --git a/configure b/configure
index 7ba1be3c1f63f9b224ae7d5ad423b0b714bb9170..8c3d398dd105457cad02be66cf2e73d4d11fef98 100755
--- a/configure
+++ b/configure
@@ -586,6 +586,7 @@ cd build
 
 ## remove enerything
 echo "Calling cmake ../. $conf_options"
+echo "cmake ../. $conf_options" > cmake_build_options 
 rm ../error_code
 DYLD_LIBRARY_PATH=$ld_lib_pathopt cmake ../. $conf_options
 if [ $? != 0 ]; then
diff --git a/example/SparseGrid/1_gray_scott_3d_sparse_gpu_opt_weak_scal/main.cu b/example/SparseGrid/1_gray_scott_3d_sparse_gpu_opt_weak_scal/main.cu
index 0e683a8d6eaddee3dd9e90d9dcc3613de98f3c60..b0c2804c4b0db46c709a2e3bfcb780f63199e6b4 100644
--- a/example/SparseGrid/1_gray_scott_3d_sparse_gpu_opt_weak_scal/main.cu
+++ b/example/SparseGrid/1_gray_scott_3d_sparse_gpu_opt_weak_scal/main.cu
@@ -102,8 +102,8 @@ void init(SparseGridType & grid, Box<3,float> & domain, size_t (& div)[3])
 
 				for (int s = 0 ; s < 3 ; s++)
 				{
-					bx.setLow(s,(size_t)((sph.center(i) - 0.31)/grid.spacing(i)));
-					bx.setHigh(s,(size_t)((sph.center(i) + 0.31)/grid.spacing(i)));
+					bx.setLow(s,(size_t)((sph.center(s) - 0.31)/grid.spacing(s)));
+					bx.setHigh(s,(size_t)((sph.center(s) + 0.31)/grid.spacing(s)));
 				}
 
 				grid.addPoints([spacing_x,spacing_y,spacing_z,sph] __device__ (int i, int j, int k)