Fix building vertices

Fix connecting first and last poinst of polygon