Fixed bug (atomicity of mesh assignment!)