fix the flip offset