small fixes
BUG fixed inverting polygon