repair some minor bugs

use linesMesh to speed up a little though still slow