Fix Exception warnings

Fix exception warnings (due to the code being converted from vb net)
commented out fill polygon code