fix flipped $