polygon drawing fix