Fix to work with multidimensional objects