fixed polygon ambiguity by changing way its stored