fixed bugs in trimesh