fix segfault, use hasMesh() which checks first that the mesh indeed exists
update issue #79
update mesh
update issue #92