Fix to previous commit.
Get dimensions from mesh.