Bugfixes in triangleMesh