fix polygon drawing