Fix minor bug & add polygon flip feature