Marking polygon keeps flickering