add indices geometry, fix small bugs