diff --git a/install b/install
index 8906ba02502ecdfa7347c03bada6d4a301f1abba..54cfc12611e1c000053d9972fd35c8af6a11c69b 100755
--- a/install
+++ b/install
@@ -224,7 +224,7 @@ echo -e "Installing requirements into: $i_dir "
 
 if [ ! -d "$i_dir/PETSC" -o ! -f "$i_dir/PETSC/include/petsc.h" -o ! -d "$i_dir/EIGEN" ]; then
     echo -e "\033[1;34m Optional packages  \033[0m"
-    echo -e "\033[1mDo you want to install linear algebra packages ?(y/n)\033[0m"
+    echo -e "\033[1mDo you want to install linear algebra packages and extended Level-set functionalities ?(y/n)\033[0m"
     if [ $sq -eq 0 ]; then
       read inst_lin_alg
     else
@@ -296,9 +296,6 @@ configure_options=" $configure_options --with-parmetis=$i_dir/PARMETIS "
 ./script/install_Metis.sh $i_dir $CC $CXX $ncore
 configure_options=" $configure_options --with-metis=$i_dir/METIS "
 
-./script/install_blitz_algoim.sh $i_dir $ncore
-configure_options=" $configure_options --with-blitz=$i_dir/BLITZ --with-algoim=$i_dir/ALGOIM "
-
 if [ x"$gpu_support" == x"1" ]; then
 	configure_options=" $configure_options --enable-gpu "
 fi
@@ -407,6 +404,8 @@ else
     if [ x"$inst_lin_alg" == x"y" ]; then
         CXX="$CXX" CC="$CC" FC="$FC" F77="$F77" ./script/install_EIGEN.sh $i_dir $ncore
         CXX="$CXX" CC="$CC" FC="$FC" F77="$F77" ./script/install_PETSC.sh $i_dir $ncore $CC $CXX $F77 $FC
+	./script/install_blitz_algoim.sh $i_dir $ncore
+	configure_options=" $configure_options --with-blitz=$i_dir/BLITZ --with-algoim=$i_dir/ALGOIM "
     fi
 
     ### collect PETSC configuration options
diff --git a/openfpm_data b/openfpm_data
index d78de3919144686d1e88a2c46a88ad3fa2a79043..fff636ed0b30106e0084608c9e7aa6034a2d63c1 160000
--- a/openfpm_data
+++ b/openfpm_data
@@ -1 +1 @@
-Subproject commit d78de3919144686d1e88a2c46a88ad3fa2a79043
+Subproject commit fff636ed0b30106e0084608c9e7aa6034a2d63c1
diff --git a/src/Amr/grid_dist_amr.hpp b/src/Amr/grid_dist_amr.hpp
index 7c171bdc415092949eedc40c26fcd199d1bb1e17..8fd29645029de596b15563e1c0d9760dd4e77187 100644
--- a/src/Amr/grid_dist_amr.hpp
+++ b/src/Amr/grid_dist_amr.hpp
@@ -574,7 +574,7 @@ public:
 	 * \return the selected element
 	 *
 	 */
-	template <unsigned int p>inline auto get(const grid_dist_amr_key<dim> & v1) const -> typename std::add_lvalue_reference<decltype(gd_array.get(v1.getLvl()).template get<p>(v1.getKey()))>::type
+	template <unsigned int p>inline auto get(const grid_dist_amr_key<dim> & v1) const -> decltype(gd_array.get(v1.getLvl()).template get<p>(v1.getKey()))
 	{
 #ifdef SE_CLASS2
 		check_valid(this,8);
@@ -590,7 +590,7 @@ public:
 	 * \return the selected element
 	 *
 	 */
-	template <unsigned int p>inline auto get(const grid_dist_amr_key<dim> & v1) -> typename std::add_lvalue_reference<decltype(gd_array.get(v1.getLvl()).template get<p>(v1.getKey()))>::type
+	template <unsigned int p>inline auto get(const grid_dist_amr_key<dim> & v1) -> decltype(gd_array.get(v1.getLvl()).template get<p>(v1.getKey()))
 	{
 #ifdef SE_CLASS2
 		check_valid(this,8);
@@ -607,7 +607,7 @@ public:
 	 * \return the selected element
 	 *
 	 */
-	template <unsigned int p>inline auto get(size_t lvl, const grid_dist_key_dx<dim> & v1) const -> typename std::add_lvalue_reference<decltype(gd_array.get(lvl).template get<p>(v1))>::type
+	template <unsigned int p>inline auto get(size_t lvl, const grid_dist_key_dx<dim> & v1) const -> decltype(gd_array.get(lvl).template get<p>(v1))
 	{
 #ifdef SE_CLASS2
 		check_valid(this,8);
@@ -623,7 +623,7 @@ public:
 	 * \return the selected element
 	 *
 	 */
-	template <unsigned int p>inline auto get(size_t lvl, const grid_dist_key_dx<dim> & v1) -> typename std::add_lvalue_reference<decltype(gd_array.get(lvl).template get<p>(v1))>::type
+	template <unsigned int p>inline auto get(size_t lvl, const grid_dist_key_dx<dim> & v1) -> decltype(gd_array.get(lvl).template get<p>(v1))
 	{
 #ifdef SE_CLASS2
 		check_valid(this,8);
@@ -644,7 +644,7 @@ public:
 	 */
 	template <unsigned int p>
 	inline auto insert(const grid_dist_amr_key<dim> & v1)
-	-> typename std::add_lvalue_reference<decltype(gd_array.get(v1.getLvl()).template insert<p>(v1.getKey()))>::type
+	-> decltype(gd_array.get(v1.getLvl()).template insert<p>(v1.getKey()))
 	{
 #ifdef SE_CLASS2
 		check_valid(this,8);
@@ -663,7 +663,7 @@ public:
 	 *
 	 */
 	template <unsigned int p>inline auto insert(size_t lvl, const grid_dist_key_dx<dim> & v1)
-	-> typename std::add_lvalue_reference<decltype(gd_array.get(lvl).template insert<p>(v1))>::type
+	-> decltype(gd_array.get(lvl).template insert<p>(v1))
 	{
 #ifdef SE_CLASS2
 		check_valid(this,8);
diff --git a/src/Amr/grid_dist_amr_unit_tests.cpp b/src/Amr/grid_dist_amr_unit_tests.cpp
index 96e07f01d595217d8d70ece9b32517a92139fa7a..69b36180bd3eb1b613e3748666d48e296c62af8d 100644
--- a/src/Amr/grid_dist_amr_unit_tests.cpp
+++ b/src/Amr/grid_dist_amr_unit_tests.cpp
@@ -56,6 +56,14 @@ void Test3D_amr_create_levels(grid_amr & amr_g, Box<3,float> & domain, size_t co
 
 			amr_g.template insert<0>(akey) = 3.0;
 
+			amr_g.template insert<1>(akey)[0] = 3.0;
+			amr_g.template insert<1>(akey)[1] = 3.0;
+			amr_g.template insert<1>(akey)[2] = 3.0;
+
+			amr_g.template insert<2>(akey)[0] = 3;
+			amr_g.template insert<2>(akey)[1] = 3;
+			amr_g.template insert<2>(akey)[2] = 3;
+
 			count++;
 
 			++it;
@@ -831,11 +839,11 @@ BOOST_AUTO_TEST_CASE( grid_dist_amr_test )
 	k = std::pow(k, 1/3.);
 
 	Ghost<3,long int> g(0);
-	grid_dist_amr<3,float,aggregate<float>> amr_g(domain3,g);
+	grid_dist_amr<3,float,aggregate<float,float[3],int[3]>> amr_g(domain3,g);
 
 	Test3D_amr_create_levels(amr_g,domain3,k,4);
 
-	sgrid_dist_amr<3,float,aggregate<float>> amr_g2(domain3,g);
+	sgrid_dist_amr<3,float,aggregate<float,float[3],int[3]>> amr_g2(domain3,g);
 
 	Test3D_amr_create_levels(amr_g2,domain3,k,4);
 }