fix bug when triangle mesh has negative index