fixed the flip