fix finite flipping