Fixed bugs for selecting. and for drawing/filling polygons.