fixed selection order bug, and also the polygon fill bug.