Just changed the initial value for the number of sides for the polygon to 3 (the minimum number of sides).