fix bugs in select plane
fix bug in drawPlane