Fixed polygon error after changing to pointers