Fixed incorrect calculation of polygon origin position;