Fix bug#2: if flippedImage\[0\] equals previous flippedImage\[1\], then flippedImage\[0\] stucks