fix up magic