diff --git a/skfem/assembly/basis/abstract_basis.py b/skfem/assembly/basis/abstract_basis.py
index 63290000..d352694e 100644
--- a/skfem/assembly/basis/abstract_basis.py
+++ b/skfem/assembly/basis/abstract_basis.py
@@ -295,13 +295,13 @@ class AbstractBasis:
 
         # loop over solution components
         for c in range(len(refs)):
-            ref = refs[c][1].basis[0][0]
-            ref = ref.astuple
-            fs = []
+            ref = refs[c][1].basis[0][0].astuple
 
-            def linear_combination(n, refn):
+            def linear_combination(n):
                 """Global discrete function at quadrature points."""
-                out = np.zeros_like(refn, dtype=w.dtype)
+                out = 0. * np.einsum('...,...j->...j',
+                                     w[self.element_dofs[0]],
+                                     self.basis[0][c].get(n))
                 for i in range(self.Nbfun):
                     values = w[self.element_dofs[i]]
                     out += np.einsum('...,...j->...j', values,
@@ -309,9 +309,10 @@ class AbstractBasis:
                 return out
 
             # interpolate DiscreteField
+            fs = []
             for n in range(len(ref)):
                 if ref[n] is not None:
-                    fs.append(linear_combination(n, ref[n]))
+                    fs.append(linear_combination(n))
                 else:
                     fs.append(None)
 

diff --git a/tests/test_basis.py b/tests/test_basis.py
index d77533ad..c39fd890 100644
--- a/tests/test_basis.py
+++ b/tests/test_basis.py
@@ -117,6 +117,13 @@ class TestCompositeFacetAssembly(TestCase):
         assert_allclose(A[0].todense()[0, ::2],
                         C[0].todense()[0])
 
+        y = fbasis1.zeros()
+        y[fbasis1.get_dofs('left')] = 1
+        assert_allclose(
+            fbasis1.project(fbasis1.interpolate(fbasis1.ones())),
+            y,
+        )
+
 
 class TestFacetExpansion(TestCase):
 

FacetBasis on a set of facets with ElementComposite not working
```python
from skfem import *

mesh = MeshTri().refined(3)

facet_basis = FacetBasis(mesh, ElementTriP1() * ElementTriP1(), facets='left')
facet_basis.interpolate(facet_basis.zeros())
```
results in
```
ValueError: operands could not be broadcast together with shapes (32,3) (8,3) (32,3) 
```
tests/test_basis.py::TestCompositeFacetAssembly::runTest
tests/test_basis.py::TestCompositeSplitting::runTest tests/test_basis.py::TestFacetExpansion::runTest tests/test_basis.py::TestFacetExpansionHexS2::runTest tests/test_basis.py::TestFacetExpansionHex2::runTest tests/test_basis.py::TestInterpolatorTet::runTest tests/test_basis.py::TestInterpolatorTet2::runTest tests/test_basis.py::TestInterpolatorTri::runTest tests/test_basis.py::TestInterpolatorQuad::runTest tests/test_basis.py::TestInterpolatorHex::runTest tests/test_basis.py::TestInterpolatorLine::runTest tests/test_basis.py::TestInterpolatorLine2::runTest tests/test_basis.py::TestIncompatibleMeshElement::runTest tests/test_basis.py::test_interpolator_probes[MeshTri1-e0-0-10] tests/test_basis.py::test_interpolator_probes[MeshTri1-e1-1-10] tests/test_basis.py::test_interpolator_probes[MeshTri1-e2-5-10] tests/test_basis.py::test_interpolator_probes[MeshTri1-e3-1-300000.0] tests/test_basis.py::test_interpolator_probes[MeshTet1-e4-1-10] tests/test_basis.py::test_interpolator_probes[MeshTet1-e5-4-10] tests/test_basis.py::test_interpolator_probes[MeshTet1-e6-1-30000.0] tests/test_basis.py::test_interpolator_probes[MeshQuad1-e7-1-10] tests/test_basis.py::test_interpolator_probes[MeshQuad1-e8-1-300000.0] tests/test_basis.py::test_interpolator_probes[MeshHex1-e9-1-100000.0] tests/test_basis.py::test_interpolator_probes[MeshWedge1-e10-0-10] tests/test_basis.py::test_trace[MeshTri1-e10-e20-False] tests/test_basis.py::test_trace[MeshTri1-e11-e21-False] tests/test_basis.py::test_trace[MeshTri1-e12-e22-False] tests/test_basis.py::test_trace[MeshTri1-e13-e23-False] tests/test_basis.py::test_trace[MeshTri1-e14-e24-True] tests/test_basis.py::test_trace[MeshTri1-e15-e25-True] tests/test_basis.py::test_trace[MeshTri1-e16-e26-True] tests/test_basis.py::test_trace[MeshTri1-e17-e27-True] tests/test_basis.py::test_trace[MeshTri1-e18-None-False] tests/test_basis.py::test_trace[MeshTri1-e19-None-True] tests/test_basis.py::test_trace[MeshQuad1-e110-e210-False] tests/test_basis.py::test_trace[MeshQuad1-e111-e211-False] tests/test_basis.py::test_trace[MeshQuad1-e112-e212-False] tests/test_basis.py::test_trace[MeshQuad1-e113-e213-True] tests/test_basis.py::test_trace[MeshQuad1-e114-e214-True] tests/test_basis.py::test_trace[MeshQuad1-e115-e215-True] tests/test_basis.py::test_trace[MeshTet1-e116-e216-False] tests/test_basis.py::test_trace[MeshTet1-e117-e217-False] tests/test_basis.py::test_trace[MeshHex1-e118-e218-False] tests/test_basis.py::test_trace[MeshHex1-e119-e219-False] tests/test_basis.py::test_trace[MeshHex1-e120-e220-False] tests/test_basis.py::test_point_source[ElementLineP1] tests/test_basis.py::test_point_source[ElementLineP2] tests/test_basis.py::test_point_source[ElementLineMini] tests/test_basis.py::test_pickling tests/test_basis.py::test_mortar_basis[m10-m20-1.0] tests/test_basis.py::test_mortar_basis[m11-m21-1.4142135623730951] tests/test_basis.py::test_basis_project[m0-e0-<lambda>] tests/test_basis.py::test_basis_project[m1-e1-<lambda>] tests/test_basis.py::test_basis_project[m2-e2-<lambda>] tests/test_basis.py::test_basis_project_composite[m0-e0-p10-p20] tests/test_basis.py::test_basis_project_composite[m1-e1-p11-p21] tests/test_basis.py::test_basis_project_composite[m2-e2-<lambda>-p22] tests/test_basis.py::test_basis_project_composite[m3-e3-<lambda>-p23] tests/test_basis.py::test_basis_project_composite[m4-e4-<lambda>-p24] tests/test_basis.py::test_basis_project_grad tests/test_basis.py::test_basis_interpolate_project[m0-e0] tests/test_basis.py::test_basis_interpolate_project[m1-e1] tests/test_basis.py::test_basis_interpolate_project[m2-e2] tests/test_basis.py::test_basis_interpolate_project[m3-e3] tests/test_basis.py::test_subdomain_facet_assembly tests/test_basis.py::test_subdomain_facet_assembly_2 tests/test_basis.py::test_oriented_interface_integral[m0-e0-interfacee-<lambda>] tests/test_basis.py::test_oriented_interface_integral[m1-e1-interface-<lambda>] tests/test_basis.py::test_oriented_gauss_integral[m0-e0] tests/test_basis.py::test_oriented_gauss_integral[m1-e1] tests/test_basis.py::test_oriented_gauss_integral[m2-e2] tests/test_basis.py::test_oriented_saveload[m0] tests/test_basis.py::test_oriented_saveload[m1] tests/test_basis.py::test_oriented_saveload[m2] tests/test_basis.py::test_oriented_saveload[m3] tests/test_basis.py::test_oriented_saveload[m4] tests/test_basis.py::TestZerosOnes::runTest